package com.sg.controller.bff;

import com.sg.service.biz.bff.PlanDataService;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Api(value = "PlanData", tags = {"PlanData"})
@RestController
// @RequestMapping("/oms/planData/")
public class PlanDataController {
    @Autowired
    PlanDataService planDataService;

    /**
     * B3-5查规划资料列表
     * gen by moon at 11/2/2022, 8:08:18 AM
     */
    @PostMapping("/oms/planData/queryPlanDataList")
    @ApiOperation(value = "B3-5查规划资料列表", response = OkrResult.class)
    public OkrResult<BffQueryPlanDataListRespDto> queryPlanDataList(@RequestBody(required = false) @Validated BffQueryPlanDataListReqDto reqDTO) {
        return OkrResult.success(planDataService.queryPlanDataList(reqDTO));
    }

    /**
     * B3-5查规划资料详情
     * gen by moon at 9/13/2022, 3:43:40 AM
     */
    @PostMapping("/oms/planData/queryPlanDataDetail")
    @ApiOperation(value = "B3-5查规划资料详情", response = OkrResult.class)
    public OkrResult<BffQueryPlanDataDetailRespDto> queryPlanDataDetail(@RequestBody(required = false) @Validated BffQueryPlanDataDetailReqDto reqDTO) {
        return OkrResult.success(planDataService.queryPlanDataDetail(reqDTO));
    }

    /**
     * B3-5查询中层规划资料列表
     * gen by moon at 10/23/2022, 2:36:46 PM
     */
    @PostMapping("/oms/planData/queryMidPlanDataList")
    @ApiOperation(value = "B3-5查询中层规划资料列表", response = OkrResult.class)
    public OkrResult<BffQueryMidPlanDataListRespDto> queryMidPlanDataList(@RequestBody(required = false) @Validated BffQueryMidPlanDataListReqDto reqDTO) {
        return OkrResult.success(planDataService.queryMidPlanDataList(reqDTO));
    }

    /**
     * B3-5查询管理模式规划资料列表(管理)
     * gen by moon at 11/2/2022, 8:08:30 AM
     */
    @PostMapping("/oms/mgt/planData/queryPlanDataMgtList")
    @ApiOperation(value = "B3-5查询管理模式规划资料列表(管理)", response = OkrResult.class)
    public OkrResult<BffQueryPlanDataMgtListRespDto> queryPlanDataMgtList(@RequestBody(required = false) @Validated BffQueryPlanDataMgtListReqDto reqDTO) {
        return OkrResult.success(planDataService.queryPlanDataMgtList(reqDTO));
    }

    /**
     * B3-5查询管理模式规划资料详情(管理)
     * gen by moon at 11/30/2022, 5:59:34 PM
     */
    @PostMapping("/oms/mgt/planData/queryPlanDataMgtDetail")
    @ApiOperation(value = "B3-5查询管理模式规划资料详情(管理)", response = OkrResult.class)
    public OkrResult<BffQueryPlanDataMgtDetailRespDto> queryPlanDataMgtDetail(@RequestBody(required = false) @Validated BffQueryPlanDataMgtDetailReqDto reqDTO) {
        return OkrResult.success(planDataService.queryPlanDataMgtDetail(reqDTO));
    }

    /**
     * B3-5新增规划资料(管理)
     * gen by moon at 11/10/2022, 11:50:13 PM
     */
    @PostMapping("/oms/mgt/planData/addPlanData")
    @ApiOperation(value = "B3-5新增规划资料(管理)", response = OkrResult.class)
    public OkrResult<BffAddPlanDataRespDto> addPlanData(@RequestBody(required = false) @Validated BffAddPlanDataReqDto reqDTO) {
        return OkrResult.success(planDataService.addPlanData(reqDTO));
    }

    /**
     * B3-5删除规划资料(管理)
     * gen by moon at 10/8/2022, 3:09:15 AM
     */
    @PostMapping("/oms/mgt/planData/deletePlanData")
    @ApiOperation(value = "B3-5删除规划资料(管理)", response = OkrResult.class)
    public OkrResult<BffDeletePlanDataRespDto> deletePlanData(@RequestBody(required = false) @Validated BffDeletePlanDataReqDto reqDTO) {
        return OkrResult.success(planDataService.deletePlanData(reqDTO));
    }

    /**
     * B3-新增规划资料文档关系
     * gen by moon at 11/11/2022, 5:42:37 AM
     */
    @PostMapping("/oms/planData/addBusAppDocRela")
    @ApiOperation(value = "B3-新增规划资料文档关系", response = OkrResult.class)
    public OkrResult<BffAddBusAppDocRelaRespDto> addBusAppDocRela(@RequestBody(required = false) @Validated BffAddBusAppDocRelaReqDto reqDTO) {
        return OkrResult.success(planDataService.addBusAppDocRela(reqDTO));
    }

    /**
     * B3更新当前规划资料(管理)
     * gen by moon at 10/8/2022, 3:10:40 AM
     */
    @PostMapping("/oms/mgt/planData/refreshCurrentPlanData")
    @ApiOperation(value = "B3更新当前规划资料(管理)", response = OkrResult.class)
    public OkrResult<BffRefreshCurrentPlanDataRespDto> refreshCurrentPlanData(@RequestBody(required = false) @Validated BffRefreshCurrentPlanDataReqDto reqDTO) {
        return OkrResult.success(planDataService.refreshCurrentPlanData(reqDTO));
    }

    /**
     * B3存档当前规划资料(管理)
     * gen by moon at 10/8/2022, 3:10:42 AM
     */
    @PostMapping("/oms/mgt/planData/archiveCurrentPlanData")
    @ApiOperation(value = "B3存档当前规划资料(管理)", response = OkrResult.class)
    public OkrResult<BffArchiveCurrentPlanDataRespDto> archiveCurrentPlanData(@RequestBody(required = false) @Validated BffArchiveCurrentPlanDataReqDto reqDTO) {
        return OkrResult.success(planDataService.archiveCurrentPlanData(reqDTO));
    }

    /**
     * B3-5修改规划资料(管理)
     * gen by moon at 10/8/2022, 3:09:17 AM
     */
    @PostMapping("/oms/mgt/planData/updatePlanData")
    @ApiOperation(value = "B3-5修改规划资料(管理)", response = OkrResult.class)
    public OkrResult<BffUpdatePlanDataRespDto> updatePlanData(@RequestBody(required = false) @Validated BffUpdatePlanDataReqDto reqDTO) {
        return OkrResult.success(planDataService.updatePlanData(reqDTO));
    }

}

